package com.example.login.domain.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

@Data
@Schema(description = "员工密码登录时传递的数据模型")
public class EmployeeLoginPasswordDTO {

    @Schema(description ="手机号" , example = "15808647075")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    @Schema(description ="密码" , example = "aaa111")
    @Pattern(regexp = "^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{6,20}$", message = "密码至少包含一个字母和一个数字，长度为6-20位")
    private String password;

}